Delphi and C++Builder applications can be built either with or without runtime packages. We recommend building applications for automated testing without runtime packages. This topic explains specifics of both methods.
Applications built without runtime packages
When an application is built without runtime packages, all objects and debug information are compiled into a single large .exe file. This is the recommended method, because it enables TestComplete to access all objects in the application. This ensures correct recording and playback of actions against UI controls, including complex controls such as grids and ribbons.
Applications built with runtime packages
When an application is built with runtime packages, the compiler creates separate runtime package files (.bpl). These packages contain executable code that can be accessed by any application with necessary permissions. This offers a major advantage when building extensible applications, since any extensions will also be able to use the code from these packages.
To test applications that use runtime packages:
- The runtime packages must have debug information. TestComplete needs this information to access objects in your application.
- You need to enable Read debug information for statically linked libraries in your TestComplete project.
Delphi and C++Builder provide incomplete debug information for some packages, such as vcl*.bpl and rtl*.bpl. If your tested application uses these packages, TestComplete may be unable to automate grids, ribbons and other controls in your application, because it lacks the necessary debug information. For example, TestComplete may record coordinate-based actions even if the Object Browser shows specific actions like ClickItem
.
To work around the issue, do any of the following:
-
Create separate build targets for the production (release) and test (debug) versions of your application, and build the test version without runtime packages. This way, you can both test your application with TestComplete and keep its extensibility in the release version.
-
If you have the package source code, manually rebuild it with the debug information. Here are instructions for Developer Express and TMS Software packages:
Preparing Developer Express VCL Components for C++Builder Applications
Preparing TMS Software VCL Components for C++Builder Applications
See Also
Testing Delphi Applications
Preparing Delphi Applications for Testing
Testing C++Builder Applications
Preparing C++Builder Applications for Testing